package org.nf.trading.dao;

import org.nf.trading.entity.Favorite;

import java.util.List;

public interface FavoriteMapper {
    /**
     * 通过用户id查询收藏商品的数量
     * @param uid
     * @return
     */
    Long countByUId(Integer uid);

    /**
     * 通过用户id查询全部收藏的商品
     * @param uid
     * @return
     */
    List<Favorite> listFavoritesByUid(Integer uid);

    int deleteByPrimaryKey(Integer favoriteId);

    int insert(Favorite record);

    Favorite selectByPrimaryKey(Integer favoriteId);

    List<Favorite> selectAll();

    int updateByPrimaryKey(Favorite record);
}